package com.fy.fyspace.service;

import com.fy.fyspace.common.result.Result;
import com.fy.fyspace.model.dto.file.ShareSessionDTO;
import com.fy.fyspace.model.dto.file.ShowShareFileQueryDTO;
import com.fy.fyspace.model.entity.FileInfo;
import com.fy.fyspace.model.vo.file.FolderVO;
import com.fy.fyspace.model.vo.user.UserSessionVO;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface ShowShareService {

    /**获取分享文件信息
     *
     * @param shareId
     * @return
     */
    Result getShareInfo(String shareId, HttpSession httpSession);

    /**校验分享码
     *  @param shareId
     * @param code
     * @return
     */
    ShareSessionDTO checkShareCode(HttpSession httpSession, String shareId, String code);

    /**提取分享文件
     *
     * @param showShareFileQueryDTO
     * @return
     */
    Result loadFileList(HttpSession httpSession, ShowShareFileQueryDTO showShareFileQueryDTO);

    /**获取发现文件夹目录信息
     *
     * @param path
     * @return
     */
    List<FolderVO> getFolderInfo(String path);

    /**
     * 保存分享文件
     * @param userSessionVO
     * @param shareId
     * @param shareFileIds
     * @param myFolderId
     * @return
     */
    Result saveShare(UserSessionVO userSessionVO, String shareId, String shareFileIds, String myFolderId);

    /**获取文件路径
     *
     * @return
     */
    FileInfo getFilePath(String fileId);

    /**创建下载路径
     *
     * @param httpSession
     * @param shareId
     * @param fileIds
     * @return
     */
    Result createDownloadURL(HttpSession httpSession, String shareId, String fileIds);


    /**加载文件夹
     *
     * @param httpSession
     * @param filePid
     * @return
     */

    List<FileInfo> loadMyFolder(HttpSession httpSession,String filePid);

    /**
     * 校验分析有效性
     * @param shareId
     * @return
     */
    Result getShareLoginInfo(String shareId);
}
